home *** CD-ROM | disk | FTP | other *** search
- Path: athos.cc.bellcore.com!news
- From: "Sandeep V. Tamhankar" <stamhank@notes.cc.bellcore.com>
- Newsgroups: comp.lang.c
- Subject: Re: CONVERTING INTEGER TO ASCII??????
- Date: 15 Mar 1996 16:24:57 GMT
- Organization: Bell Communications Research
- Message-ID: <4ic5kp$d0g@athos.cc.bellcore.com>
- References: <4i17r9$2kn@maltese.eag.unisysgsg.com> <4i1cvg$1cg@solutions.solon.com>
- NNTP-Posting-Host: nv-stamhankar.cc.bellcore.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.2 (Windows; U; 16bit)
-
- Mr. Seebach, I think you've been reading this group for too long and have
- become bitter about "beginners'" questions. Granted that converting an
- integer to ASCII is really easy, but people who've just started
- programming in C need time to get used to the language and its immense
- functionality. I didn't learn about sprintf for a very long time after I
- began programming in C. Anyway, I'm going off the point.
-
- Another way to convert integer to ASCII is to add char '0' to your
- integer. Like so:
-
- int asc;
- asc= known_int + '0';
-
- This way, you don't have to load any function and there is no overhead.
-
- -----------------
- Sandeep V. Tamhankar
- Analysis Technician
- Signaling Capabilities Analysis
-
- e-mail: stamhank@notes.cc.bellcore.com
-
-
-